﻿using System.Windows;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using WPFPractice.Utils;
using WPFPractice.ViewModels;

namespace WPFPractice.Windows
{
   /// <summary>
   /// WinStyles.xaml 的交互逻辑
   /// </summary>
   public partial class WinStyles : Window
	{
		public WinStyles()
		{
			InitializeComponent();
			DataContext = new StylesViewModel();
		}
	}
}

namespace WPFPractice.ViewModels
{
   public class StylesViewModel : MyBindableBase
	{
		#region 绑定

		public string CurrentSelectedId { get; set; }

		#endregion

		#region 命令

		#region [命令] 切换
		private ICommand _SwitchCmd;
		public ICommand SwitchCmd => _SwitchCmd ??= new RelayCommand<string>(ExecuteSwitchCmd);
		private void ExecuteSwitchCmd(string para)
		{
			CurrentSelectedId = para;
		}
		#endregion

		#endregion
	}
}
